package me.passtime.projt.util;

import android.content.Context;
import android.content.Intent;
import me.passtime.projt.Main;
import me.passtime.projt.account.ChangePasswordPage;
import me.passtime.projt.query.QueryPaymentPage;
import me.passtime.projt.reg.RegisterStepOnePage;

import java.net.ContentHandler;

/**
 * Created by IntelliJ IDEA.
 * User: Lee
 * Date: 11-12-5
 * Time: 下午4:20
 */
public class PageJumpUtils {
    public static void jump(Context currentPage, Class targetPageClass) {
        Intent intent = new Intent(currentPage, targetPageClass);
        currentPage.startActivity(intent);
    }
    public static void logoutAndJumpToMainPage(Context currentPage){
        UserHolder.clean();
        Intent intent = new Intent(currentPage, Main.class);
        currentPage.startActivity(intent);
    }

    public static void jumpToManageAccountPage(Context currentPage){
        Intent intent = new Intent(currentPage, ChangePasswordPage.class);
        currentPage.startActivity(intent);
    }

    public static void jumpToQueryPaymentPage(Context currentPage){
        Intent intent = new Intent(currentPage, QueryPaymentPage.class);
        currentPage.startActivity(intent);
    }
}
